﻿

using System;
using System.ServiceModel;
using System.Runtime.Serialization;

using WCFModel;
using WCFContract;

namespace WCFService
{

    public class StudentService : IStudentService
    {
        public string GetStudentName(Int32 id)
        {
            var obj = GetStudentData(id);
            return obj.FirstName + "-" + obj.LastName;
        }

        public Student GetStudent(Int32 id)
        {
            return GetStudentData(id);
        }

        private Student GetStudentData(Int32 id)
        {
            return new Student() {  Id = id, FirstName = "luo", LastName = "liang", AliasName= "xiaoluo", Age = 100 + id};
        }
    }

}
